#ifndef CPP_USB_SERVICE_H
#define CPP_USB_SERVICE_H

//@brief USB服务
//@author cvte
//@description 监听USB插入拔出
class UsbService {
   public:
    class UsbServiceListener {
       public:
        virtual void onUsbUdiskPlugChanged(bool isPlugIn); //U盘插入拔出事件
    };

    static UsbService* getInstance();
    //@method 设置监听
    void setListener(UsbServiceListener& listener);
    void notifyProc(uint32_t id_notify, uint8_t* value);

   private:
    static UsbService* sInstance;
    UsbServiceListener* mListener = nullptr;

    UsbService();
    virtual ~UsbService();
};

#endif